class StoreController < ApplicationController
  skip_before_filter :authorize
	include CurrentCart
  before_action :set_cart
  def index
  	if params[:set_locale]
      redirect_to store_url(locale: params[:set_locale])
    else
      # @products = Product.order(:title)
      @products=Product.find(:all,:conditions=>{:locale=>I18n.locale})

    end
    latest = Product.latest
    fresh_when etag: latest, last_modified: latest.created_at.utc
    expires_in 10.minutes, public: true
  end
end
